home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / MacHaskell 2.2 / printers / README < prev    next >
Encoding:
Text File  |  1994-09-27  |  963 b   |  20 lines  |  [TEXT/ttxt]

  1. This directory contains print routines for the structures defined in
  2. the ast/ directory.
  3.  
  4. The global *print-structure* controls printing of objects in the
  5. structure system.  Values are:
  6.   haskell  -- Prints haskell format expressions from ast
  7.   struct   -- Prints the raw structs (with circularity check)
  8.   top      -- Prints top level only of the struct
  9.  
  10. The file defs.scm has the basic hooks to the printer mechanism.  The
  11. idea is that when *print-structure* is 'haskell, the print function stored
  12. in the type descriptor will get used.  If there isn't a print function,
  13. or if *print-structure* is false, then the thing will print out in
  14. some generic way that's good for debugging purposes.
  15.  
  16. The macro define-printer is used to associate a print function with a
  17. structure type.  Since these can be defined on the fly, the print
  18. dispatching routine has to look up the inheritance chain of type
  19. descriptors looking for the first inherited type that has a printer.
  20.